package com.farm.monitor;

// 具体观察者 - 湿度监控器
public class HumidityMonitor implements SensorObserver {
    @Override
    public void update(EnvironmentSensor sensor) {
        System.out.println("湿度监控器: 当前湿度 = " + sensor.getHumidity() + "%");
        if (sensor.getHumidity() > 80) {
            System.out.println("警告: 湿度过高!");
        }
    }
}